package jhlee42;

import java.util.Scanner;

public class J02MyAge_sol {
	public static void main(String[] args) {
		// 1. 변수 선언
		int birthYear;
		int currentYear;
		int age;
		
		// 2. 생년입력, 나이계산	
		Scanner sc;
		sc = new Scanner(System.in);
		System.out.println("생년을 입력하세요");
		birthYear = sc.nextInt();
		System.out.println("현재연도를 입력하세요");
		currentYear = sc.nextInt();
		
		age = currentYear - birthYear + 1;
		

		// 3. 결과 출력
		
		System.out.println(age);

	}

}
